# Maintainer:
# Contributor: Daniel Bermond < yahoo-com: danielbermond >

pkgname=libraqm
pkgver=0.7.2
pkgrel=2
pkgdesc='A library that encapsulates the logic for complex text layout'
arch=(x86_64)
url='https://github.com/HOST-Oman/libraqm/'
license=(MIT)
depends=(freetype2 fribidi)
makedepends=(meson gtk-doc)
source=(https://github.com/HOST-Oman/libraqm/releases/download/v$pkgver/raqm-$pkgver.tar.xz
        https://github.com/HOST-Oman/libraqm/commit/819a3e9c.patch)
sha256sums=('92e765f180033ef3750832eb6fee4e07de3f99bd3d1eae7cf7e4e390ed2ae8eb'
            '320a26e63954e760c526b7bb5e2f9526cb76cdd7be2d3ad3e3883b32634e3c99')

prepare() {
  patch -d raqm-$pkgver -p1 < 819a3e9c.patch # Fix meson library version
}

build() {
  meson build raqm-$pkgver \
    --prefix=/usr \
    -D docs=true
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"

  install -D -m644 raqm-$pkgver/COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
